3.75 \(\int \frac{\left (2-3 x+x^2\right ) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx\)

Optimal. Leaf size=29 \[ \log (x+1) (d-e+f)-\log (x+2) (d-2 e+4 f)+f x \]

[Out]

f*x + (d - e + f)*Log[1 + x] - (d - 2*e + 4*f)*Log[2 + x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0817662, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129 \[ \log (x+1) (d-e+f)-\log (x+2) (d-2 e+4 f)+f x \]

Antiderivative was successfully verified.

[In]  Int[((2 - 3*x + x^2)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4),x]

[Out]

f*x + (d - e + f)*Log[1 + x] - (d - 2*e + 4*f)*Log[2 + x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \left (d - 2 e + 4 f\right ) \log{\left (x + 2 \right )} + \left (d - e + f\right ) \log{\left (x + 1 \right )} + \int f\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2-3*x+2)*(f*x**2+e*x+d)/(x**4-5*x**2+4),x)

[Out]

-(d - 2*e + 4*f)*log(x + 2) + (d - e + f)*log(x + 1) + Integral(f, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0227694, size = 30, normalized size = 1.03 \[ \log (x+1) (d-e+f)+\log (x+2) (-d+2 e-4 f)+f x \]

Antiderivative was successfully verified.

[In]  Integrate[((2 - 3*x + x^2)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4),x]

[Out]

f*x + (d - e + f)*Log[1 + x] + (-d + 2*e - 4*f)*Log[2 + x]

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 45, normalized size = 1.6 \[ fx-\ln \left ( 2+x \right ) d+2\,\ln \left ( 2+x \right ) e-4\,\ln \left ( 2+x \right ) f+\ln \left ( 1+x \right ) d-\ln \left ( 1+x \right ) e+\ln \left ( 1+x \right ) f \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2-3*x+2)*(f*x^2+e*x+d)/(x^4-5*x^2+4),x)

[Out]

f*x-ln(2+x)*d+2*ln(2+x)*e-4*ln(2+x)*f+ln(1+x)*d-ln(1+x)*e+ln(1+x)*f

_______________________________________________________________________________________

Maxima [A]  time = 0.702563, size = 39, normalized size = 1.34 \[ f x -{\left (d - 2 \, e + 4 \, f\right )} \log \left (x + 2\right ) +{\left (d - e + f\right )} \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="maxima")

[Out]

f*x - (d - 2*e + 4*f)*log(x + 2) + (d - e + f)*log(x + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.253867, size = 39, normalized size = 1.34 \[ f x -{\left (d - 2 \, e + 4 \, f\right )} \log \left (x + 2\right ) +{\left (d - e + f\right )} \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="fricas")

[Out]

f*x - (d - 2*e + 4*f)*log(x + 2) + (d - e + f)*log(x + 1)

_______________________________________________________________________________________

Sympy [A]  time = 2.24305, size = 44, normalized size = 1.52 \[ f x + \left (- d + 2 e - 4 f\right ) \log{\left (x + \frac{4 d - 6 e + 10 f}{2 d - 3 e + 5 f} \right )} + \left (d - e + f\right ) \log{\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2-3*x+2)*(f*x**2+e*x+d)/(x**4-5*x**2+4),x)

[Out]

f*x + (-d + 2*e - 4*f)*log(x + (4*d - 6*e + 10*f)/(2*d - 3*e + 5*f)) + (d - e +
f)*log(x + 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.282943, size = 45, normalized size = 1.55 \[ f x -{\left (d + 4 \, f - 2 \, e\right )}{\rm ln}\left ({\left | x + 2 \right |}\right ) +{\left (d + f - e\right )}{\rm ln}\left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="giac")

[Out]

f*x - (d + 4*f - 2*e)*ln(abs(x + 2)) + (d + f - e)*ln(abs(x + 1))